home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / dev / gui / gui4cli.lha / Gui4Cli / Tools / fastread / ViewText.g < prev   
Encoding:
Gui4CLI script  |  1999-11-26  |  1.7 KB  |  97 lines

  1. G4C
  2.  
  3. WINBIG 0 11 634 220 ""
  4. winsmall 0 -1 150 21
  5. wintype 11110001
  6. resinfo 8 640 256
  7. varpath "fastread.gc"
  8.  
  9. xonopen
  10.     ifexists window fastread.gc
  11.         ;Nop
  12.     else
  13.         setgad viewtext.g 3 off
  14.         setgad viewtext.g 4 off
  15.         setgad viewtext.g 5 off
  16.     endif
  17.  
  18. xonclose
  19.     set translation on
  20.     lvuse viewtext.g 1
  21.     lvclear
  22.     ifexists window fastread.gc
  23.         gosub fastread.gc exit
  24.     endif
  25.  
  26. xonrmb
  27.     set translation on
  28.     lvuse viewtext.g 1
  29.     lvclear
  30.     ifexists window fastread.gc
  31.         update viewtext.g 2 ""
  32.         guiwindow fastread.gc front
  33.         guiwindow fastread.gc on
  34.     else
  35.         guiclose viewtext.g
  36.     endif
  37.  
  38. XTEXTBOX 0 0 371 15 '' ''
  39.     attr tbstyle 1/0/plain/left
  40.     attr tbox    2/1/0/button/out
  41.     gadid 2
  42.     attr resize 0020
  43.  
  44. ;text 10 0 350 12 "" 50 nobox
  45. ;    gadid 2
  46.  
  47. XLISTVIEW 0 15 633 204 "" "" "" 20 num
  48.     gadid  1
  49.     attr resize 0022
  50.     gadfont #mono 8 000
  51.  
  52.  
  53. XBUTTON 372 0 60 15 Macro
  54.     attr resize 2000
  55.     gadid 3
  56.     if $VTMACRO > ""
  57.     andifexists file $VTMACRO
  58.         run 'newshell "con:0/11/640/200/OUTPUT/CLOSE WAIT" from $VTMACRO'
  59.     else
  60.         reqfile -1 -1 200 -60 "Run Macro..." load macro GCHELP:
  61.         if $macro != ""
  62.             run 'newshell "con:0/11/640/200/OUTPUT/CLOSE WAIT" from $macro'
  63.             macro = ""
  64.         endif
  65.     endif
  66.  
  67. XBUTTON 432 0 50 15 Prev
  68.     attr resize 2000
  69.     gadid 4
  70.     lvuse fastread.gc 1
  71.     lvgo prev
  72.     topic = $$lv.rec
  73.     gosub fastread.gc fetchtext 
  74.  
  75. XBUTTON 482 0 50 15 Next
  76.     attr resize 2000
  77.     gadid 5
  78.     lvuse fastread.gc 1
  79.     lvgo next
  80.     topic = $$lv.rec
  81.     gosub fastread.gc fetchtext 
  82.  
  83. XBUTTON 532 0 50 15 Grab
  84.     attr resize 2000
  85.     gosub viewtext.g grabtext
  86.  
  87. XBUTTON 582 0 50 15 Quit
  88.     attr resize 2000
  89.     guiclose viewtext.g
  90.  
  91. xroutine grabtext
  92.     reqfile -1 -1 200 -60 "Save Text As.." save txt SYS:
  93.     if $txt != ""
  94.         lvuse viewtext.g 1
  95.         lvsave $txt
  96.     endif
  97.